% script to load the ace_data, calculate the EEF and LT reponse
% 
function[fday, pp ,lt_res] = getPromptP(year,month,day,nDays,longitude)

load /data/backup/mnair/ace_tensor/acedata/ace_2000_2010.mat ace_all;

st = datenum(year,month,day) - 3/24;
en = st + nDays + 3/24;

L = ace_all(:,1) >= st & ace_all(:,1) <= en;

ief_ey = ace_all(L,2);

fday = ace_all(L,1);

L = isnan(ief_ey);

ief_ey(L) = 0;

pp = ppefm(ief_ey,'Ey');

% find the lt shift

pp(L) = NaN;


lt_res = pp_lt_response(fday, longitude / 15);

